<!--
 * @Author       : 刘洋 liuy5335@163.com
 * @Date         : 2025-02-14 14:20:09
 * @LastEditors  : 刘洋 liuy5335@163.com
 * @LastEditTime : 2025-02-14 14:20:34
 * @FilePath     : \zhly-vform\src\components\form-designer\setting-panel\property-editor\event-handler\onFilePreview-editor.vue
 * @Description  : 介绍文件的作用
 * 
 * Copyright (c) 2025 by zhlx - liuy5335@163.com, All Rights Reserved. 
-->
<template>
  <el-form-item label="onFilePreview" label-width="150px">
    <el-button type="info" icon="el-icon-edit" plain round :class="[eventHandled ? 'button-text-highlight' : '']"
               @click="editEventHandler('onFilePreview', eventParams)">
      {{i18nt('designer.setting.addEventHandler')}}</el-button>
  </el-form-item>
</template>

<script>
  import i18n from "@/utils/i18n"
  import eventMixin from "@/components/form-designer/setting-panel/property-editor/event-handler/eventMixin"

  export default {
    name: "onFilePreview-editor",
    mixins: [i18n, eventMixin],
    props: {
      designer: Object,
      selectedWidget: Object,
      optionModel: Object,
      eventHandled: {
        type: Boolean,
        default: false,
      },
    },
    data() {
      return {
        eventParams: ['file', 'fileList'],
      }
    }
  }
</script>

<style scoped>

</style>
